@(loginForm: play.data.Form[_])

@import helper._
@import play.core.j.PlayMagicForJava._
@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapBasic.f) }
@import com.feth.play.module.pa.views.html._

@main(Messages("playauthenticate.login.title"),"login") {

  <div class="row">
    <div class="col-xs-6 col-sm-4">
      <h1>@Messages("playauthenticate.login.title")</h1>
    </div>
  </div>

  <div id="login" class="row">

    <div class="col-xs-6 col-sm-4">
      @* Display proprietary login form *@
    	@helper.form(controllers.gsn.auth.routes.LocalAuthController.doLogin, 'class -> "form-horizontal", 'role -> "form") {

        @if(loginForm.hasGlobalErrors) {
          	<p class="alert alert-danger">
	          @loginForm.globalError.message
	     	</p>
        }

        @_emailPartial(loginForm)

        @inputPassword(
          loginForm("password"),
          '_showConstraints -> false,
          '_label -> Messages("playauthenticate.login.password.placeholder")
        )

            <button type="submit" class="btn btn-default">@Messages("playauthenticate.login.now")</button>

        <a href="javascript:void(0);" onclick="window.location.href = jsRoutes.controllers.gsn.auth.Signup.forgotPassword($('#email').val() || null).absoluteURL();">@Messages("playauthenticate.login.forgot.password")</a>

    	}
    </div>

   <div class="col-xs-6 col-sm-4">
      @Messages("playauthenticate.login.oauth")
      @* Display list of available providers *@
      @_providerPartial(skipCurrent=false)
    </div>

  </div>

}

